package com.example.keli.ui.worldwall;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.keli.R;
import com.example.keli.base.utils.GlideUtil;
import com.example.keli.ui.my.model.VoteReceiveBean;
import com.example.keli.ui.userinfo.UserInfoDialog;

import java.util.List;

/**
 * description:
 * author: Allen
 * date: 2019/3/19 11:51
 */
public class CommentListAdapter extends BaseQuickAdapter<CommentListBean, BaseViewHolder> {

    public CommentListAdapter(List<CommentListBean> mData, Context context) {
        super(R.layout.item_commentlist, mData);
    }

    @Override
    protected void convert(BaseViewHolder helper, final CommentListBean mListBean) {
        ImageView avater = helper.getView(R.id.iv_comment_avatar);
        GlideUtil.displayCircle(mContext, avater, mListBean.getAvater());
        helper.setText(R.id.tv_comment_name, mListBean.getUsername());
        helper.setText(R.id.tv_comment_content, mListBean.getContent());
        helper.setText(R.id.tv_comment_date, mListBean.getDate());
        ImageView image = helper.getView(R.id.iv_comment_photo);
        GlideUtil.display(mContext, image, mListBean.getImage());
    }

}
